// Utility.h: interface for the CUtility class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_UTILITY_H__8B0D69BA_CFC0_4846_A4FC_A729596C3418__INCLUDED_)
#define AFX_UTILITY_H__8B0D69BA_CFC0_4846_A4FC_A729596C3418__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "StdAfx.h"
#include "Global.h"

class CUtility  
{
public:
	CUtility();
	virtual ~CUtility();
	LPCSTR GetUrlEncode(LPCSTR str);
	static int Uni2UTF(WCHAR wchar, LPSTR utf8);
	static LPWSTR AnsiToUnicode(LPCSTR pszText);
	static LPSTR CovertoASCII(LPCSTR pstr);
	LPSTR curl_unescape(LPCSTR string, int length);
	LPSTR curl_escape( LPCTSTR string, int inlength);
	
	LPCSTR BstrLTrim(BSTR* bstr);
	LPCSTR BstrRTrim(BSTR* bstr);
	
	VOID headspace(LPSTR s);
	VOID tailspace(LPSTR s);
	LPTSTR GetCurrentPath();
	LPCTSTR GetCurrentPathFile( LPCTSTR exe);
	HRESULT GetCommandArray( LPCTSTR args, CStringArray& strArray );

};

#endif // !defined(AFX_UTILITY_H__8B0D69BA_CFC0_4846_A4FC_A729596C3418__INCLUDED_)
